<?php

/**
 * @author Thibaut Cromphaut, Gaïtano Boeraeve, Mathias Helin, Dimitry Dierickx
 * @copyright  Copyright (c) 2011 Artevelde University College Ghent 
 */

class Application_Form_Element_WorldSelect extends Zend_Form_Element_Select {
    public function init() {
        $world = new Application_Model_World();
        $this->addMultiOption(0, 'Kies ...');        
        $this->setLabel('World:');
        $worldMapper = new Application_Model_WorldMapper();
      
        foreach ($worldMapper->fetchAll() as $world) {
            $this->addMultiOption($world->getId(), $world->getName());
        }
    }
}